# coding: utf-8
# @Author: 莫小鱼
import os
import shutil
import sys
import pytest

# 获取项目的根目录
DIR_PATH = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.append(DIR_PATH)  # 将根目录添加到模块搜索路径

# 默认等待时间设置，默认10s
WAIT_TIME = 10

# 设置浏览器
browser_type = 'chrome'

# 设置浏览器是否以无头模式运行，默认为:False
headless = False

# 钉钉机器人
secret = "SECb3ce8a40d266716d25f1a25e2cf7fbd5f8183053c2c59edeee4087c3e7930370"
rebot_url = "https://oapi.dingtalk.com/robot/send?access_token=58106b3c04bd6373bace0bd415e330e85ff87bda11346152e5b8240fa687eed1"

# 设置是否发送钉钉群消息
is_dd_msg = True

# 文件路径
FILE_PATH = {
    'log': os.path.join(DIR_PATH, 'logs'),
    'screenshots': os.path.join(DIR_PATH, 'screenshots'),
    'ini': os.path.join(DIR_PATH, "config", "config.ini")
}
print(FILE_PATH['ini'])

if __name__ == '__main__':
    pytest.main()
    # shutil.copy('./environment.xml', './report/temp')
    # os.system('allure serve ./report/temp')
